package lab02.test11;

/**
 * Created by V555 on 2017/10/23.
 */
public class Rectangle implements Printx {
    int length;
    int width;
    int area;
    int perimeter;

    int area() {
        area = length * width;
        return area;
    }

    int perimeter() {
        perimeter = (length + width) * 2;
        return perimeter;
    }
    @Override
    public void printMyWay() {
        System.out.println(length);
        System.out.println(width);
        System.out.println(area);
        System.out.println(perimeter);
    }
}
